﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="LeaveConfigure.aspx.cs" Inherits="HRM.UI.HRManagerUI.Configuration.LeaveConfigure" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Configuration/ConfigureLeaveCsscss.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript" language="javascript">

        function CheckField() {
            if (document.getElementById("<%=txtEarnLeave.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Earn Leave!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEarnLeave.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtSickLeave.ClientID%>").Value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Sick Leave!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtSickLeave.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtCasualLeave.ClientID%>").value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Casual Leave!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtCasualLeave.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtOthersleave.ClientID%>").Value == "") {
                document.getElementById("<%=msgLabel.ClientID%>").textContent = "Please Enter Others Leave!";
                document.getElementById("<%=msgLabel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtOthersleave.ClientID%>").focus();
                return false;
            }

            return true;
        }
  

    </script>
    <fieldset>
        <legend>Configure Leave</legend>
        <table width="100%">
            <tr>
                <td style="width: 50%">
                    <table>
                        <tr>
                            <td colspan="2" class="msgTD">
                                <asp:Label runat="server" ID="msgLabel"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="Label">
                                Earn Leave
                            </td>
                            <td class="Field">
                                <input type="text" runat="server" id="txtEarnLeave" class="textboxinput" /><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="Label">
                                Sick Leave
                            </td>
                            <td class="Field">
                                <input type="text" runat="server" id="txtSickLeave" class="textboxinput" /><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="Label">
                                Casual Leave
                            </td>
                            <td class="Field">
                                <input type="text" runat="server" id="txtCasualLeave" class="textboxinput" /><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="Label">
                                Other Leave
                            </td>
                            <td class="Field">
                                <input type="text" runat="server" id="txtOthersleave" class="textboxinput" /><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <input id="Submit1" type="submit" value="Add Leave" runat="server" onserverclick="SaveLeave"
                                    class="btnCss" onclick="return CheckField()" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top">
                    <fieldset>
                        <legend>Reset Leave</legend>
                        <asp:Label runat="server" ID="resetMsgLbl"></asp:Label><br />
                        <asp:RadioButton runat="server" ID="resetLeaveRadio" Text="Reset Leave" GroupName="reset" />
                        <br />
                        <asp:RadioButton runat="server" ID="resetAndAddPreviousPrevious" Text="Reset & Add with Previous Remaining Leave"
                            GroupName="reset" />
                        <br />
                        <br />
                        <div id="resetLeave" runat="server">
                            <input type="button" id="reset" value="Reset Leave" runat="server" onserverclick="ResetLeave"
                                class="btnCss" />
                        </div>
                    </fieldset>
                </td>
            </tr>
        </table>
    </fieldset>
    <div align="center">
        <fieldset>
            <legend>Company Leave Format</legend>
            <asp:GridView runat="server" ID="TotalLeaveGdv" Width="70%" CssClass="GridviewStyle"
                AutoGenerateColumns="False" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                CellPadding="3" ForeColor="Black" GridLines="Vertical">
                <AlternatingRowStyle />
                <Columns>
                    <asp:BoundField DataField="EarnLeave" HeaderText="Earn Leave" />
                    <asp:BoundField DataField="SickLeave" HeaderText="Sick Leave" />
                    <asp:BoundField DataField="CasualLeave" HeaderText="Casual Leave" />
                    <asp:BoundField DataField="Others" HeaderText="Others" />
                </Columns>
                <FooterStyle CssClass="GridViewFooterStyle" />
                <HeaderStyle CssClass="GridViewHeaderStyle" />
                <PagerStyle CssClass="GridViewFooterStyle" />
                <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />
            </asp:GridView>
        </fieldset>
    </div>
</asp:Content>
